﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SharpSoft.Geometries.Structs
{
    /// <summary>
    /// 正多边形
    /// </summary>
    public struct RegularPolygon
    {
        /// <summary>
        /// 正多边形的边的数量
        /// </summary>
        public int SideCount { get; set; }
        /// <summary>
        /// 正多边形的一条边边长
        /// </summary>
        public double SideLength { get; set; }
        /// <summary>
        /// 获取正多边形的内角
        /// </summary>
        public Radian InteriorAngle
        {
            get
            {
                return new Radian(Math.PI * (this.SideCount - 2) / this.SideCount);
            }
        }
    }
}
